<!DOCTYPE html>
<html lang="zh-CN">
<head>
	 <meta charset="utf-8">
  	<title>Layui</title>
  	<meta name="renderer" content="webkit">
  	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="../css/topbar.css">
	<link rel="stylesheet" href="../layui/css/layui.css">
	<style type="text/css">
	.crumbs{
		padding-left: 160px;
		padding-top: 10px;
	}
	.table-style{
		padding-left: 160px;
		padding-top: 20px;
		width: 1100px;
	}	
	</style>
</head>
<body>
	<div class="main">
		<div class="top">
			<label>校园BBS系统</label>
		</div>
		<div class="bar"><p>您尚未
			<a href="login.html" target="_blank">登录</a>&nbsp;|
	  		<a href="register.html" target="_blank">注册</a></p>
		</div>
		<div class="crumbs">
        	<span class="layui-breadcrumb">
  				<a href="index.html">论坛主页</a>
  				<a href="">灌水乐园</a>
  				<a><cite>待定</cite></a>
			</span>
		</div>
		<div class="table-style">
			<table class="layui-hide" id="test"></table>
		</div>

</div>
<script type="text/javascript" src="../layui/layui.js"></script>
<script type="text/javascript">
layui.use('element', function(){
  var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
  
  //监听导航点击
  element.on('nav(demo)', function(elem){
    //console.log(elem)
    layer.msg(elem.text());
  });
});
layui.use('table', function(){
  var table = layui.table;
  
  table.render({
    elem: '#test'
    ,url:'/demo/table/user/'
    ,cols: [[
      {field:'id', width:80, title: 'ID', sort: true}
      ,{field:'username', width:80, title: '用户名'}
      ,{field:'sex', width:80, title: '性别', sort: true}
      ,{field:'city', width:80, title: '城市'}
      ,{field:'sign', title: '签名', minWidth: 150}
      ,{field:'experience', width:80, title: '积分', sort: true}
      ,{field:'score', width:80, title: '评分', sort: true}
      ,{field:'classify', width:80, title: '职业'}
      ,{field:'wealth', width:135, title: '财富', sort: true}
    ]]
    ,page: true
  });
});
</script>
</body>
</html>